'use strict';

const Controller = require('egg').Controller;

//控制器是接收前端传递的参数，经过处理之后，给前端响应的

class HomeController extends Controller {
    async index() {
        const { ctx } = this;
        ctx.body = 'hi, egg';
    }
    async list(){
        const { ctx } = this;
        console.log(ctx.params.limit)
        ctx.body = [1,2,3];
    }
}

module.exports = HomeController;
